//===========================定义全局变量开始============================
export interface State {
  list: Array<groupBean>;
  count: number;
  commLoading: boolean;
  defaultPath: string;
  unToken: Array<String>;
  isOpen: boolean;
  cityList: Array<CityList>;
  menus: Array<MenuList>; // 定义菜单变量
  permissions: Array<String>;
  username: string; //用户名
  avatar: string; //用户头像
  token: string;
  storageKey: string;
  logoUrl: string; //logo
}
//=======================登录信息=============================
export interface LoginParams {
  username: string;
  password: string;
}

// ===========================全局变量结束================================
export interface CityList {
  city: string;
  code: string;
  province: string;
}

//菜单接口
export interface MenuList {
  key: string;
  title: string;
  path: string;
  customIcon: string;
  permission: string;
  menuLeaf?: boolean;
  children?: Array<ChildrenList>; //?: 非必填选项
  defaultPath?: string; // ?: 非必填选项
}

export interface UserInfo {
  id: string;
  name: string;
  loginName: string;
  avatar: string;
  password: string;
  token: string;
  roleId: string;
}
export interface Token {
  token: string;
}
export interface ChildrenList {
  key: string;
  title: string;
  path: string;
  inner?: boolean;
  children?: Array<ChildrenList>;
}

// 分页
export interface Page {
  pageNumber: number;
  pageSize: number;
}

// 请求对象
export interface userInfo extends Page {
  //继承
  keyword: string;
  groupId: string;
  purpose: string;
  selectedIds: Array<any>; // 数组的定义
}
//阿里云上传图片
export interface AliForm {
  uploadFiles: Array<any>;
  welcomeContent: String;
  loginBackgroundList: Array<any>;
}

//返回对象
export interface listData extends Page {
  totalSize: number;
  rows: Array<any>;
}

export interface groupBean {
  userAccount: string;
  userName: string;
  userGender: string;
  userDepartment: string;
  userType: string;
}
//table表格的基本信息
export interface ParamData extends Page {
  type: string;
  criteria: string;
  includeAttributes: Array<any>;
}
//继承group.ts使用
export interface GroupParamData extends Page {
  criteria: string;
  includeAttributes: Array<any>;
}
//校历
export interface CalendarData {
  code: string;
  name: string;
  schoolArea: string;
  studentStatus: string;
  person: string;
  department: string;
  semesterYear: Date;
  semesterNumber: number;
  dateStart: string;
  dateEnd: string;
  dateStartTeaching: string;
  dateEndTeaching: string;
  dateCheckinStaff: string;
  dateCheckinStudent: string;
  description: string;
}
//select 异步
export interface WholeData extends Page {
  dictName: string;
  filter: boolean;
}

//上传照片
export interface ImageView {
  src: string;
  imgTitle: object;
  previewModal: boolean;
}

//使用cropper上传图片
type ViewMode = 0 | 1 | 2 | 3;
type DragMode = "crop" | "move" | "none";
export interface ImageData {
  aspectRatio: number;
  viewMode?: ViewMode;
  minContainerWidth?: number;
  minContainerHeight?: number;
  dragMode?: DragMode;
  preview?: any;
}

//导入数据
export interface ExportResultData {
  failNum: number;
  batchId: number;
  successNum: number;
}

//多个可能属性
export type possibleType = [string | number];

export interface HeaderList {
  src: string;
}
//学校检索列表
export interface SchoolParams {
  schoolCode: string;
  schoolType: number;
  schoolName: string;
}
